import { createApp } from 'vue'
import App from './App.vue'
import ElementUI from 'element-plus'
import './assets/styles/element-variables.scss'
import '@/assets/styles/index.scss' // global css
import "@/assets/fonts/font.css"
import router from './router'
import store from './store'
import process from 'process'
import locale from 'element-plus/es/locale/lang/zh-cn'

// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
let platform = 2
if (process.platform === 'darwin') {
    platform = 3
}
store.commit('setPlatform', platform)
app.use(router).use(store).use(ElementUI, { locale }).mount('#app')